<template>
  <div class="mi-setting">
    <van-nav-bar
    title="个人中心"
    left-arrow
    @click-left="$router.go(-1)"
    />
    <van-cell-group>
      <van-cell title="地址管理" size="large" is-link/>
      <van-cell title="经营证照" size="large" is-link/>
      <van-cell title="协议规则" size="large" is-link/>
      <van-cell title="隐私管理" size="large" is-link/>
      <van-cell title="小米商城用户协议" size="large" is-link/>
      <van-cell title="小米商城隐私政策" size="large" is-link/>
      <van-cell title="小米账号使用协议" size="large" is-link/>
      <van-cell title="小米账号隐私政策" size="large" is-link/>
    </van-cell-group>
    <div class="mi-setting__bottom" @click="RTokenAndId">退出账号</div>
  </div>
</template>
<script>
import Vue from 'vue'
import { Cell, CellGroup, Toast } from 'vant'
import { mapActions } from 'vuex'

Vue.use(Cell)
Vue.use(CellGroup)
export default {
  name: 'MiSetting',
  methods: {
    ...mapActions('user', ['removeTokenAndId']),
    RTokenAndId () {
      this.removeTokenAndId()
      Toast('注销成功!')
      this.$router.push({ name: 'mine' })
    }
  }
}
</script>
<style lang="scss" scoped>
.mi-setting {
  &__bottom {
    width: 100%;
    height: 100%;
    height: .5rem;
    background: rgb(244, 244, 244);
    margin-top: 1.87rem;
    text-align: center;
    line-height: .5rem;
    font-size: .16rem;
    box-shadow: 0 0 15px rgb(230, 230, 230);
  }
}
</style>
